V = Variables
C = Calculation functions
* = Replaces the function VC11FndYPnt
The VC12FndYPnt function calculates the y-coordinate of a point to a line According to 2 points of the same line(X1-Y1 and X2-Y2) and the x-coordinate of point (XP).
VC12FndYPnt (pointX1, pointY1, pointX2, pointY2, pointXP, pointYP)
Parameters:
| IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
|---|---|---|---|---|
| IN | SYSTEM or GLOBAL | pointX1 | L/S | Point X1 of the straight line (Abscissa X1) |
| IN | SYSTEM or GLOBAL | pointY1 | L/S | Point Y1 of the straight line (Ordinate Y1) |
| IN | SYSTEM or GLOBAL | pointX2 | L/S | Point X2 of the straight line (Abscissa X2) |
| IN | SYSTEM or GLOBAL | pointY2 | L/S | Point Y2 of the straight line (Ordinate Y2) |
| IN | SYSTEM or GLOBAL | pointXP | L/S | Point X of the straight line for which you want to calculate the abscissa (Y) |
| OUT | SYSTEM or GLOBAL | pointYP | L/S | Point Y of the straight line calculated by the function (Unknown ordinate) |
N.B.: pointX1, pointY1, pointY1, pointY2 between them must be the same size (DIM). All parameters must be the same type (SYSTEM or GLOBAL)
Esegui il calcolo quando il flag “gfCalc” viene posto a 1.
IF gfCalc gfCalc = 0 pointX1 = 100 ;Imposta i valori dei punti della retta pointY1 = 600 pointX2 = 200 pointY2 = 1200 pointXP = 150 VC12FndYPnt (pointX1, pointY1, pointX2, pointY2, pointXP, pointYP) gsAscissaCal = pointYP ENDIF